//
//  OthersPersonalProfileTableViewCell.m
//  TheRoadAD
//
//  Created by 宁宁 on 16/8/19.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "OthersPersonalProfileTableViewCell.h"

@implementation OthersPersonalProfileTableViewCell
{
    NSArray *_btnArray;
}


- (void)setCellValue:(NSArray *)model{
    _btnArray = @[_photo0, _photo1, _photo2, _photo3, _photo4, _photo5, _photo6, _photo7, _photo8];
    
    _age.text = model[0];
    _identified.text = model[1];
    _weixin.text = model[2];
    _area.text = model[3];
    _education.text = model[4];
    _car.text = model[5];
    
    for (int i = 0; i < [model[6] count]; i++) {
        UIButton *btn = _btnArray[i];
        [btn setImage:[UIImage imageNamed:model[6][i]] forState:UIControlStateNormal];
        [btn addTarget:self action:@selector(showPhoto:) forControlEvents:UIControlEventTouchUpInside];
    }
}

- (void)showPhoto:(UIButton *)sender{
    
    for (int i = 0; i < _btnArray.count; i++) {
        UIButton *button = _btnArray[i];
        if (button == sender) {
            _showPhoto(i);
        }
    }    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
